<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.sailorj.medical.domain.medical.Medical" %>
<%@ page import="com.sailorj.medical.domain.medical.Item" %>
<%@ include file="/common/base.jsp"%>
<%
 String id=request.getParameter("id");
 //根据区域编号加载实例
 Medical model=new Medical(id);
	ItemDao itemDao = new ItemDao();
	List<Item> list02=itemDao.findListByType("02");
	List<Item> list06=itemDao.findListByType("06");
	List<Item> list04=itemDao.findListByType("04");
	List<Item> list01=itemDao.findListByType("01");
	List<Item> list03=itemDao.findListByType("03");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/admin.css">
	<link rel="stylesheet" type="text/css" href="other/layui/css/layui.css">
	<script type="text/javascript" src="other/layui/layui.all.js"></script>
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/admin.js"></script>
	<script src="other/layui/layui.all.js"></script>
	<link rel="stylesheet" href="other/layui/css/layui.css">
	<script type="text/javascript">
		$(document).ready(function() {
			//重新绑定表单提交
			$("#add_btn").bind("click", function() {
				// $('form').submit();
				layer.confirm("确定修改该数据？",{
					btn: ['确定', '取消']
				}, function () {
					$('form').submit();
				}, function(){
					layer.closeAll();
				});

			});
		});
	</script>

</head>

<body>

	<div class="panel admin-panel">
		<div class="panel-head" id="add">
			<strong><span class="icon-pencil-square-o"></span>修改经办机构编码信息</strong>
		</div>
		<div class="body-content">
			<form id="form-add" method="post" class="form-x"
				action="<%=path%>/system/MedicalServlet?m=edit">
				<div class="form-group">
					<div class="label">
						<label>医疗机构编码：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getJgbm()%>" name="jgbm"
							   data-validate="required:请输入医疗机构编码" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>组织机构编码：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getZzjgbm()%>" name="zzjgbm"
							   data-validate="required:请输入组织机构编码" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>机构名称：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getJgmc()%>" name="jgmc"
							   data-validate="required:必填项" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>地区编码：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getDqbm()%>" name="dqbm"
							   data-validate="required:必填项" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>行政区域编码：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getAreacode()%>" name="areacode"
							   data-validate="required:必填项" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>隶属关系：</label>
					</div>
					<div class="field">
						<select id="lsgx" name="lsgx" class="input w50">
							<% for(Item m:list02){ %>
							<option value="<%=m.getItemname()%>"><%=m.getItemname()%></option>
							<% }%>
						</select>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>机构级别：</label>
					</div>
					<div class="field">
						<select id="jgjb" name="jgjb" class="input w50">
							<% for(Item m:list06){ %>
							<option value="<%=m.getItemname()%>"><%=m.getItemname()%></option>
							<% }%>
						</select>
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>申请定点类型：</label>
					</div>
					<div class="field">
						<select id="sbddlx" name="sbddlx" class="input w50">
							<% for(Item m:list04){ %>
							<option value="<%=m.getItemname()%>"><%=m.getItemname()%></option>
							<% }%>
						</select>
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>批准定点类型：</label>
					</div>
					<div class="field">
						<select id="lsgx" name="pzddlx" class="input w50">
							<% for(Item m:list04){ %>
							<option value="<%=m.getItemname()%>"><%=m.getItemname()%></option>
							<% }%>
						</select>
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>所属经济类型：</label>
					</div>
					<div class="field">
						<select id="lsgx" name="ssjjlx" class="input w50">
							<% for(Item m:list01){ %>
							<option value="<%=m.getItemname()%>"><%=m.getItemname()%></option>
							<% }%>
						</select>
						<div class="tips"></div>
					</div>
				</div>

				<div class="form-group">
					<div class="label">
						<label>卫生机构大类：</label>
					</div>
					<div class="field">
						<select id="wsjgdl" name="wsjgdl" class="input w50">
							<% for(Item m:list03){ %>
							<option value="<%=m.getItemname()%>"><%=m.getItemname()%></option>
							<% }%>
						</select>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>卫生机构小类：</label>
					</div>
					<div class="field">
						<select id="wsjgxl" name="wsjgxl" class="input w50">
							<% for(Item m:list03){ %>
							<option value="<%=m.getItemname()%>"><%=m.getItemname()%></option>
							<% }%>
						</select>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>主管单位：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getZgdw()%>" name="zgdw"
							   data-validate="required:必填项" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>开业时间：</label>
					</div>
					<div class="field">
						<input type="text" id="kysj" class="input w50" value="<%=model.getKysj()%>" name="kysj"
							   data-validate="required:必填项" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>法人代表：</label>
					</div>
					<div class="field">
						<input type="text" class="input w50" value="<%=model.getFrdb()%>" name="frdb"
							   data-validate="required:必填项" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>注册资金(万)：</label>
					</div>
					<div class="field">
						<input type="number" class="input w50" value="<%=model.getZczj()%>" name="zczj"
							   data-validate="required:必填项" />
						<div class="tips"></div>
					</div>
				</div>



				<div class="form-group">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button id="add_btn" class="button bg-main icon-check-square-o"
							type="button">提交</button>
						<button class="button bg-red icon-share-square-o" type="button" onclick="window.history.go(-1)">返回</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	!-- 以下是时间控件 -->
	<script>
		layui.use('laydate', function(){
			var laydate = layui.laydate;
			//执行一个laydate实例
			laydate.render({
				elem: '#kysj' //指定元素
				,value: '<%=model.getKysj()%>'
				,type: 'datetime',
				isInitValue: true
			});
		});
	</script>
</body>
</html>
